package com.opeartion.pojo;

import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;
import java.util.List;


@Table(name="orders")
public class Order implements Serializable {
	@Id
	private int id;//订单id
	private int total_num;//数量合计
	private int total_money;//金额合计
	private int pre_money;//优惠金额
	private int pay_money;//实付金额
	private String pay_type;//支付类型 1、在线支付  0、货到付款
	private Date create_time;//订单创建时间
	private Date update_time;//订单修改时间
	private Date pay_time;//订单付款时间
	private Date consign_time;//发货时间
	private Date end_time;//订单完成时间
	private Date close_time;//订单关闭时间
	private String shipping_name;//物流名称
	private String shiipping_code;//物流单号
	private String user_id;//用户id
	private String buyer_message;//买家留言
	private String buyer_rate;//是否评价
	private String receiver_contact;//收货人
	private String receiver_mobile;//收货人手机
	private String receiver_address;//收货人地址
	private char source_type;//订单来源 1、web 2、app 3、微信公众号 4、微信小程序 5、H5页面
	private String transaction_id;//交易流水号
	private char orders_status;//订单状态
	private char pry_status;//支付状态 0、未支付 1、已支付
	private char consign_status;//发货状态 0:待发货 1:已发货 2:已收货 3:待支付 4:待配送  5:待自提 6:申请退款
	private char is_delet;//是否删除
	private int  delivery;//配送方式 1:同城配送 2:到店自提 3:跨城配送


	public int getDelivery() {
		return delivery;
	}

	public void setDelivery(int delivery) {
		this.delivery = delivery;
	}

	private List<OrderItem> orderItems;

	public List <OrderItem> getOrderItems() {
		return orderItems;
	}

	public void setOrderItems(List <OrderItem> orderItems) {
		this.orderItems = orderItems;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public int getTotal_num() {
		return total_num;
	}

	public void setTotal_num(int total_num) {
		this.total_num = total_num;
	}

	public int getTotal_money() {
		return total_money;
	}

	public void setTotal_money(int total_money) {
		this.total_money = total_money;
	}

	public int getPre_money() {
		return pre_money;
	}

	public void setPre_money(int pre_money) {
		this.pre_money = pre_money;
	}

	public int getPay_money() {
		return pay_money;
	}

	public void setPay_money(int pay_money) {
		this.pay_money = pay_money;
	}

	public String getPay_type() {
		return pay_type;
	}

	public void setPay_type(String pay_type) {
		this.pay_type = pay_type;
	}

	public Date getCreate_time() {
		return create_time;
	}

	public void setCreate_time(Date create_time) {
		this.create_time = create_time;
	}

	public Date getUpdate_time() {
		return update_time;
	}

	public void setUpdate_time(Date update_time) {
		this.update_time = update_time;
	}

	public Date getPay_time() {
		return pay_time;
	}

	public void setPay_time(Date pay_time) {
		this.pay_time = pay_time;
	}

	public Date getConsign_time() {
		return consign_time;
	}

	public void setConsign_time(Date consign_time) {
		this.consign_time = consign_time;
	}

	public Date getEnd_time() {
		return end_time;
	}

	public void setEnd_time(Date end_time) {
		this.end_time = end_time;
	}

	public Date getClose_time() {
		return close_time;
	}

	public void setClose_time(Date close_time) {
		this.close_time = close_time;
	}

	public String getShipping_name() {
		return shipping_name;
	}

	public void setShipping_name(String shipping_name) {
		this.shipping_name = shipping_name;
	}

	public String getShiipping_code() {
		return shiipping_code;
	}

	public void setShiipping_code(String shiipping_code) {
		this.shiipping_code = shiipping_code;
	}

	public String getUser_id() {
		return user_id;
	}

	public void setUser_id(String user_id) {
		this.user_id = user_id;
	}

	public String getBuyer_message() {
		return buyer_message;
	}

	public void setBuyer_message(String buyer_message) {
		this.buyer_message = buyer_message;
	}

	public String getBuyer_rate() {
		return buyer_rate;
	}

	public void setBuyer_rate(String buyer_rate) {
		this.buyer_rate = buyer_rate;
	}

	public String getReceiver_contact() {
		return receiver_contact;
	}

	public void setReceiver_contact(String receiver_contact) {
		this.receiver_contact = receiver_contact;
	}

	public String getReceiver_mobile() {
		return receiver_mobile;
	}

	public void setReceiver_mobile(String receiver_mobile) {
		this.receiver_mobile = receiver_mobile;
	}

	public String getReceiver_address() {
		return receiver_address;
	}

	public void setReceiver_address(String receiver_address) {
		this.receiver_address = receiver_address;
	}

	public char getSource_type() {
		return source_type;
	}

	public void setSource_type(char source_type) {
		this.source_type = source_type;
	}

	public String getTransaction_id() {
		return transaction_id;
	}

	public void setTransaction_id(String transaction_id) {
		this.transaction_id = transaction_id;
	}

	public char getOrders_status() {
		return orders_status;
	}

	public void setOrders_status(char orders_status) {
		this.orders_status = orders_status;
	}

	public char getPry_status() {
		return pry_status;
	}

	public void setPry_status(char pry_status) {
		this.pry_status = pry_status;
	}

	public char getConsign_status() {
		return consign_status;
	}

	public void setConsign_status(char consign_status) {
		this.consign_status = consign_status;
	}

	public char getIs_delet() {
		return is_delet;
	}

	public void setIs_delet(char is_delet) {
		this.is_delet = is_delet;
	}

	@Override
	public String toString() {
		return "Order{" + "id=" + id + ", total_num=" + total_num + ", total_money=" + total_money + ", pre_money=" + pre_money + ", pay_money=" + pay_money + ", pay_type='" + pay_type + '\'' + ", create_time=" + create_time + ", update_time=" + update_time + ", pay_time=" + pay_time + ", consign_time=" + consign_time + ", end_time=" + end_time + ", close_time=" + close_time + ", shipping_name='" + shipping_name + '\'' + ", shiipping_code='" + shiipping_code + '\'' + ", user_id='" + user_id + '\'' + ", buyer_message='" + buyer_message + '\'' + ", buyer_rate='" + buyer_rate + '\'' + ", receiver_contact='" + receiver_contact + '\'' + ", receiver_mobile='" + receiver_mobile + '\'' + ", receiver_address='" + receiver_address + '\'' + ", source_type=" + source_type + ", transaction_id='" + transaction_id + '\'' + ", orders_status=" + orders_status + ", pry_status=" + pry_status + ", consign_status=" + consign_status + ", is_delet=" + is_delet + ", delivery=" + delivery + ", orderItems=" + orderItems + '}';
	}
}
